'''
n边形的的内角是  d=(n-2)*180/n
要旋转的是外角的度数,就是 180-d
'''


import turtle

n = 6
a = 100
d = (n-2)*180/n
p = turtle.Pen()
for i in range(n):
    p.forward(a)
    p.left(180-d)
turtle.done()